package com.sailfish.springbootdemo.service.db7;

import com.alibaba.fastjson.JSONArray;
import com.sailfish.springbootdemo.pojo.Result;
import com.sailfish.springbootdemo.pojo.db5.ToolManagement;
import com.sailfish.springbootdemo.pojo.db7.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface QueryKnowledgeBaseDataService {
    Result queryDesignRuleDetails(String baseKey);
    Result queryRealValueByKey(String curFlowNo, String templateType, JSONArray result);
    Result queryToolManagement(ToolManagement entity, Integer page, Integer pageSize);
    Result downloadBomTemplateExcel();
    Result outPutExcelOfDeviceData(JSONArray rows);

    Result syncOutPutExcelOfDeviceData(String templateType,
                                       List<Map<String, String>> keyValueMaps,
                                       int functionFlag,
                                       Integer page,
                                       Integer pageSize,
                                       String searchUser,
                                       String searchFlowType);

    Result getAllDesignPhase(String templateType);

    Result outPutExcelOfDesignData(JSONArray rows);
    Result importBomExcelInTool(MultipartFile file);
    Result importBomExcel(MultipartFile file);
    Result insertOrUpdateKnowledgeBaseLogic(List<TbKnowledgeBasePushLogic> inserts, List<String> keyList);
    Result updateIsDefaultPush(String knowledgeBaseKey, Integer isDefaultPush);
    Result getMergeKnowledgeBaseLogic(List<String> baseKeyList);
    // 器件工艺库专用检索工具方法
    Result queryDeviceData(List<Map<String, String>> keyValueMaps, int page, int pageSize, String node);
    // 获取指定模板类型的模板参数
    Result getKnowledgeTableData(Set<String> baseKeySet);
    // 知识库查询或检索方法
    Result queryKnowledgeDataByLimit(String templateType, List<Map<String, String>> keyValueMaps, int functionFlag, Integer page, Integer pageSize, String searchUser, String searchFlowType);

    List<TbKnowledgeBaseFile> transferByFileParamKey(String paramValue);
    // 辅料库查询
    Result queryExcipientsDataBylimit(List<Map<String, String>> keyValueMaps, int page, int pageSize);
    Result insertOrUpdateToExcipientsDataByExcel(MultipartFile file, boolean addData);
    Result updateExcipientsParams(List<TbTemplate> newTemplates);
    Result insertExcipientsParams(List<TbTemplate> newTemplates);
    Result deleteExcipientsParams(List<Integer> idList);
    Result deleteExcipientData(Integer rowSort);
    Result deleteExcipientDataList(List<Integer> idList);
    Result insertExcipientData(List<TbExcipientsData> excipientsDataList);
    Result updateExcipientData(List<TbExcipientsData> excipientsDataList);
    Result outPutExipientData(List<Map<String, String>> keyValueMaps);
    List<TbTemplate> getExcipientTemplateParams(Integer status);
    List<TbTemplate> getAllTemplateParams(String templateType);
    List<TbTemplate> getAllBaseTemplateParamList(List<TbTemplate> tree, String templateType);
}
